package top.doe.javase.lambda;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;

public class Ser {
    public static void main(String[] args) throws IOException {

        Person p = new Person();


//        Dep dep = new Dep(new Funct() {
//            @Override
//            public String call() {
//                return p.name + "----";
//            }
//        });


        Funct funct = () -> p.name + "----";

        ByteArrayOutputStream ba = new ByteArrayOutputStream();
        ObjectOutputStream oout = new ObjectOutputStream(ba);


        oout.writeObject(funct);
    }
}
